﻿
using UnityEngine.UI;

public class KeyboardEnglishUI
{
    private string _english;
    public int count;
    private Text _text;

    public void Init(Text text)
    {
        _text = text;
        count = 0;
    }

    public void Reset(string vEngish)
    {
        _english = vEngish;
        count = 0;
    }
    public string Incr()
    {
        count++;
        if(count > _english.Length)
        {
            return string.Empty;
        }
        _text.text = string.Format("<color=yellow>{0}</color>", _english.Substring(0, count)) + _english.Substring(count);
        string key = _english.Substring(count - 1, 1);
        return key.ToLower();
    }
}

